package grouplife::Schema::Result::TuanZhuanYi;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use Moose;
use MooseX::NonMoose;
use namespace::autoclean;
extends 'DBIx::Class::Core';

__PACKAGE__->load_components(qw( TimeStamp Core ));
=head1 NAME

grouplife::Schema::Result::FaHuo

=cut

__PACKAGE__->table("tuan_zhuanyi_request");

=head1 ACCESSORS

=head2 id

  data_type: 'integer'
  is_auto_increment: 1
  is_nullable: 0

=head2 tuan_id

  data_type: 'integer'
  is_nullable: 1

=head2 fahuo_type 

  data_type: 'T'
  is_nullable: 1

=head2 role

  data_type: 'text'
  is_nullable: 1

=cut

__PACKAGE__->add_columns(
		"id",
		{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
		"shangyou_user_id",
		{ data_type => "integer", is_nullable => 1 },
		"xiayou_user_id",
		{ data_type => "integer", is_nullable => 1 },
                "shangyou_tuan_id",
		{ data_type => "integer", is_nullable => 1 },
		"xiayou_tuan_id",	
		{ data_type => "integer", is_nullable => 1 },
		"zhuanyi_univ_id",
		{ data_type => "integer", is_nullable => 1 },
		"xiayou_percentage",
		{ data_type => "integer", is_nullable => 1 },
		"req_detail",
		{ data_type => "text", is_nullable => 1 },
		"status",
                { data_type => "char", is_nullable => 1 },
		"created",
                { data_type => "datetime", timezone => "Asia/Shanghai", set_on_create => 1 },
		"updated",
                { data_type => "datetime", timezone => "Asia/Shanghai", set_on_create => 1, set_on_update => 1 },
		"created_by",
		{ data_type => "integer", is_nullable => 1 },
		"updated_by",
		{ data_type => "integer", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");

__PACKAGE__->belongs_to(
                "tuan",
                "grouplife::Schema::Result::Tuan",
                { id => "shangyou_tuan_id" },
                { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }
                );

__PACKAGE__->belongs_to(
                "tuan",
                "grouplife::Schema::Result::Tuan",
                { id => "xiayou_tuan_id" },
                { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }
                );

__PACKAGE__->belongs_to(
                "users",
                "grouplife::Schema::Result::User",
                { id => "shangyou_user_id" },
                { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }
                );

__PACKAGE__->belongs_to(
                "users",
                "grouplife::Schema::Result::User",
                { id => "xiayou_user_id" },
                { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }
                );

__PACKAGE__->belongs_to(
                "university",
                "grouplife::Schema::Result::University",
                { id => "zhuanyi_univ_id" },
                { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }
                );

# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-28 04:13:18
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a4LZ+dwii7R4YnEOtqJfYg


# You can replace this text with custom code or comments, and it will be preserved on regeneration
__PACKAGE__->meta->make_immutable;
1;
